import 'package:flutter/material.dart';
import 'package:hao_ke/routes/routes.dart';

class PageContent extends StatelessWidget {

  final String name;

  PageContent(this.name, {super.key});

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      appBar: AppBar(
        centerTitle: true,
        title: Text(name),
      ),
      body: ListView(
        children: [
          FilledButton(onPressed: (){
            Navigator.pushNamed(context, Routes.home);
          }, child: Text(Routes.home)),
          FilledButton(onPressed: (){
            Navigator.pushNamed(context, Routes.login);
          }, child: Text(Routes.login)),
          FilledButton(onPressed: (){
            Navigator.pushNamed(context, '/sss');
          }, child: Text('404')),
          FilledButton(onPressed: (){
            Navigator.pushNamed(context, '/room/2222');
          }, child: Text('详情页面')),
        ],
      ),
    );
  }
  
}